package com.xiaochong.tir.common.util;

/**
 * @Project : xc-tir
 * @Package Name : com.xiaochong.tir.common.util
 * @Description : TODO App端的RedisKEY
 * @Author : daizhiqing@xiaochong.com
 * @Creation Date : 2018年08月10日下午4:33
 * @ModificationHistory Who When What
 */
public class RedisKeyApp {

    /**
     * 标准过期时间
     */
    public class ExpireTime{
        /**
         * 一分钟
         */
        public static final long ONE_MINI = 60L;
        /**
         * 五分钟
         */
        public static final long FIVE_MINI = 5 * ONE_MINI;

        /**
         * 一小时
         */
        public static final long ONE_HOURS = 60 * ONE_MINI;
        /**
         * 一天
         */
        public static final long ONE_DAY = 24 * ONE_HOURS;
        /**
         * 一周
         */
        public static final long ONE_WEEK = 7*  ONE_DAY;
    }
    /**
     *     统一的格式开头,分隔符用":"代替
     */
    static final String APP = "BTA:";

    /**
     * 国别号缓存
     */
    public static final String COUNTRY_NUM = APP + "COUNTRY_NUM";

    /**
     * 用户信息缓存
     */
    public static final String USER_TOKEN = APP + "u:";

    /**
     * 验证码token缓存
     */
    public static final String Code_TOKEN = APP + "c:";

    /**
     * 验证码发送次数
     */
    public static final String CODE_COUNT = APP + "c:count:";

    /**
     * 大盘指数头部信息(换手率 流通市值 等)
     */
    public static final String MARKET_DATA = APP + "market:index";

    /**
     * 概念行情
     */
    public static final String APP_CONCEPT_QUOTATIONRESULTVO = "app:concept:quotationresultvo";
    /**
     * 保存websocke的sessionId
     */
    public static final String APP_WS_K_SESSION_ID ="app:ws:sid";

    /**
     * tir大盘指数5分钟内图标数据
     */
    public static final String APP_TIR_BROADER_INDEX_ALL_DATA = "app:tir:broader:allData";
    /**
     * tir大盘指数5分钟 3小时图表
     */
    public static final String APP_TIR_BROADER_INDEX_CHART_3H = "app:tir:broader:3h";
    /**
     * tir大盘指数10分钟 24小时图表
     */
    public static final String APP_TIR_BROADER_INDEX_CHART_24H = "app:tir:broader:24h";
    /**
     * tir大盘指数1整点 7天图表
     */
    public static final String APP_TIR_BROADER_INDEX_CHART_7D = "app:tir:broader:7d";
    /**
     * tir大盘指数4小时 30天图表
     */
    public static final String APP_TIR_BROADER_INDEX_CHART_30D = "app:tir:broader:30d";
    /**
     * tir大盘指数一天 一年图表
     */
    public static final String APP_TIR_BROADER_INDEX_CHART_1Y = "app:tir:broader:1y";

    /**
     * tir权重指数5分钟内图标数据
     */
    public static final String APP_TIR_WEIGHT_INDEX_ALL_DATA  = "app:tir:weight:allData";

    /**
     * tir行业指数5分钟内图标数据
     */
    public static final String APP_TIR_INDUSTRY_INDEX_ALL_DATA = "app:tir:industry:allData";

    /**
     * 市场表现App
     */
    public static final String MARkETPER_INDEX_APP = "app:marketper:i";

    /**
     * 压力支撑App
     */
    public static final String PRESSURE_SUP_INDEX_APP = "app:pressureSup:i";

    /**
     * 平均成本App
     */
    public static final String AVG_COST_INDEX_APP = "app:avgCost:i";

    /**
     * 多空行情App
     */
    public static final String SPACETREND_INDEX_APP = "app:spacetrend:i";

    /**
     * 平台概念指数
     */
    public static final String BOTTOMTEZHI_INDEX = "app:bottomtezhi:i";

    /**
     * 行业指数
     */
    public static final String INDUSTRY_INDEX = "app:industry:i";

    /**
     * 定时处理按照成交量降序交易对信息
     */
    public static final String SEARCH_PAIR = APP + "search:pair";
    /**
     * 定时处理按照市值降序货币信息
     */
    public static final String SEARCH_COIN = APP + "search:coin";
    /**
     * 货币定时处理多家交易所平均价格后面+cmcId
     */
    public static final String COIN_PRICE = APP + "coin:price:";
    /**
     * 保存货币24h的每分钟数据
     */
    public static final String COIN_24H_DATA = APP + "coin:data:";

    /**
     * 货币趋势图
     */
    public static final String CYRRENCY_INDEX = "app:currency:i";

    /**
     * 24H资金流向分布
     */
    public static final String CAPITAL_INDEX = "app:capital:i";

    /**
     * 24H资金净流入
     */
    public static final String FLOW_INDEX = "app:flow:i";

    /**
     * 7日涨幅
     */
    public static final String INCREASE7DAY_INDEX = "app:increase7day:i";
    /**
     * 深度缓存+交易所id:交易对名称
     */
    public static final String DEPTH_CACHE = "app:depth:cache:";

    /**
     * app货币列表
     */
    public static final String CURRENCY_LIST_APP = "app:currency:list:";
    /**
     * 平台币转换成其他交易对
     */
    public static final String EXCHANGE_PING_TAI_B_CONVERT = "exchange:pair:convert:";
}
